package com.study.mysql.readwriteseparationshardingjdbc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;


@Data
@TableName("business_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class BusinessOrder implements Serializable {

    private static final long serialVersionUID = -1331651697297885571L;

    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    private String payType;

    private String orderStatus;

    private BigDecimal totalAmount;

    private String deliveryType;

    private String trackNo;

    private BigDecimal freight;

    private BigDecimal orderAmount;

    private String remark;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date addTime;

    private Timestamp expireTime;

    private Timestamp payTime;

    private String cancelCause;

    private Timestamp endTime;

    private String userId;

    private String addressId;

    private String createBy;

    private String updateBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
